package com.weirdor.mongo.exception.code;

/**
 * 字段相关错误码
 *
 * @Author werdor
 * @Date 2021/11/8 3:55 下午
 **/
public enum PropertiesErrorCode implements BaseErrorCode {

    PROPERTY_MISSING(400002, "缺失必须字段"), PROPERTY_FORMAT_ERROR(400004, "字段格式错误"), PROPERTY_ERROR(400003, "非法字段");
    // =================================================

    private int code;
    private String message;

    private PropertiesErrorCode(int code, String message) {
        this.code = code;
        this.message = message;
    }

    @Override
    public int getCode() {
        return code;
    }

    @Override
    public String getMessage() {
        return message;
    }

    @Override
    public String toString() {
        return "错误码：" + code + ", 错误信息：" + message;
    }
}